package com.alibaba.citrus.cr.platform.enhance.repository;

import java.util.List;

import com.alibaba.lattice2.epoch.sdk.model.Result;

import com.epoch.app.crplatformenhance.model.dto.*;
import com.epoch.app.crplatformenhance.sdo.DictionarySDO;

/**
 * @description: 数据字典资源层
 * @author: qianlei
 * @create: 2021/10/16 21:13
 */
public interface DictionaryRepository {
    /**
     * 分页查询
     * @param request
     * @return
     */
    Result<List<DictionarySDO>> pageQuery(QueryDictionaryListRequest request);

    /**
     * 单条查询
     * @param request
     * @return
     */
    DictionarySDO querySingle(QueryDictionaryRequest request);

    /**
     * 新增
     * @return
     */
    String createDictionary(CreateDictionaryRequest request);
    /**
     * 新增
     * @return
     */
    String createDictValue(CreateDictValueRequest request);

    /**
     * 更新字典编码信息
     * @return
     */
    boolean updateDictCode(UpdateDictCodeRequest request);
    /**
     * 更新字典值信息
     * @return
     */
    boolean updateDictValue(UpdateDictValueRequest request);

    List<DictValueSDO> queryDictValuesByCodes(QueryDictionaryListRequest request);

    DictValueSDO queryValueNameByCode(QueryDictionaryRequest request);
}
